/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package abstractmodel;

import java.util.ArrayList;


/**
 *
 * @author littlechild
 */
public interface IUser extends java.io.Serializable {
    IInfo getUserInfo();
    boolean setUserInfo(IInfo info);
    /**
     * this function is used when changing the password
     * since when IUser is created, it must have the correct password
     * this function is not needed in the procedure of login
     * @param code
     * @return
     * 
     */
    boolean checkCode(String code);
    boolean addNewBook(IBook book);
    boolean deleteBook(IBook book);
    ArrayList<IBook> getBooks();
    boolean commit();
    model.StatisticsInfo getStatistics(StatisticsType type);
    double getTotalLeftMoney();
    ArrayList<IBook> getBooksLeftMoneyMoreThan(double d);
}
